From 3f514b605b22c4ad6de5ad5b6bd0dcef3692d3f2 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 3 Sep 2003 19:32:28 +0000 Subject: [PATCH] Add nosort suboption. --- gpsbabel/position.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gpsbabel/position.c b/gpsbabel/position.c index 36b69aa3c..56eb7ec5d 100644 --- a/gpsbabel/position.c +++ b/gpsbabel/position.c @@ -33,6 +33,7 @@ static char *distopt; static char *latopt; static char *lonopt; static char *exclopt; +static char *nosort; waypoint * home_pos; @@ -57,6 +58,8 @@ arglist_t radius_args[] = { ARGTYPE_FLOAT | ARGTYPE_REQUIRED }, {"exclude", &exclopt, "Exclude points close to center", ARGTYPE_BOOL }, + {"nosort", &nosort, "Inhibit sort by distance to center.", + ARGTYPE_BOOL }, {0, 0, 0, 0} }; @@ -233,7 +236,9 @@ radius_process(void) i++; } - qsort(comp, wc, sizeof(waypoint *), dist_comp); + if (!nosort) { + qsort(comp, wc, sizeof(waypoint *), dist_comp); + } /* * The comp array is now sorted by distance. As we run through it, -- 2.30.2